From 8b84df422b83e73c1b0325537e351a4a71388887 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 23 Oct 2017 06:20:08 +0200 Subject: [PATCH] Drop gtk_recent_info_get_icon We are moving away from pixbuf-based apis. Use gtk_recent_info_get_gicon instead. --- docs/reference/gtk/gtk4-sections.txt | 1 - gtk/gtkrecentmanager.c | 36 ---------------------------- gtk/gtkrecentmanager.h | 3 --- 3 files changed, 40 deletions(-) diff --git a/docs/reference/gtk/gtk4-sections.txt b/docs/reference/gtk/gtk4-sections.txt index 040f2ae41b..d524bdda00 100644 --- a/docs/reference/gtk/gtk4-sections.txt +++ b/docs/reference/gtk/gtk4-sections.txt @@ -2391,7 +2391,6 @@ gtk_recent_info_has_application gtk_recent_info_create_app_info gtk_recent_info_get_groups gtk_recent_info_has_group -gtk_recent_info_get_icon gtk_recent_info_get_gicon gtk_recent_info_get_short_name gtk_recent_info_get_uri_display diff --git a/gtk/gtkrecentmanager.c b/gtk/gtkrecentmanager.c index 65bb375750..c655091442 100644 --- a/gtk/gtkrecentmanager.c +++ b/gtk/gtkrecentmanager.c @@ -2010,42 +2010,6 @@ get_icon_fallback (const gchar *icon_name, return retval; } -/** - * gtk_recent_info_get_icon: - * @info: a #GtkRecentInfo - * @size: the size of the icon in pixels - * - * Retrieves the icon of size @size associated to the resource MIME type. - * - * Returns: (nullable) (transfer full): a #GdkPixbuf containing the icon, - * or %NULL. Use g_object_unref() when finished using the icon. - * - * Since: 2.10 - */ -GdkPixbuf * -gtk_recent_info_get_icon (GtkRecentInfo *info, - gint size) -{ - GdkPixbuf *retval = NULL; - - g_return_val_if_fail (info != NULL, NULL); - - if (info->mime_type) - retval = get_icon_for_mime_type (info->mime_type, size); - - /* this function should never fail */ - if (!retval) - { - if (info->mime_type && - strcmp (info->mime_type, "x-directory/normal") == 0) - retval = get_icon_fallback ("folder", size); - else - retval = get_icon_fallback ("text-x-generic", size); - } - - return retval; -} - /** * gtk_recent_info_get_gicon: * @info: a #GtkRecentInfo diff --git a/gtk/gtkrecentmanager.h b/gtk/gtkrecentmanager.h index 9f15abe078..f77684ce32 100644 --- a/gtk/gtkrecentmanager.h +++ b/gtk/gtkrecentmanager.h @@ -247,9 +247,6 @@ GDK_AVAILABLE_IN_ALL gboolean gtk_recent_info_has_group (GtkRecentInfo *info, const gchar *group_name); GDK_AVAILABLE_IN_ALL -GdkPixbuf * gtk_recent_info_get_icon (GtkRecentInfo *info, - gint size); -GDK_AVAILABLE_IN_ALL GIcon * gtk_recent_info_get_gicon (GtkRecentInfo *info); GDK_AVAILABLE_IN_ALL gchar * gtk_recent_info_get_short_name (GtkRecentInfo *info) G_GNUC_MALLOC; -- 2.30.2